import java.awt.Color;
import java.awt.GraphicsEnvironment;
import javax.swing.JFrame;


public class RoboticsProjectDriver {

	public static void main(String[] args){

		boolean splash = true;
		GraphicsEnvironment e = GraphicsEnvironment.getLocalGraphicsEnvironment();

		//Creates a JFrame with a maximized window and adds the splash screen
		JFrame frame = new JFrame();
		frame.setBackground(Color.black);
		SplashScreen screen = new SplashScreen(splash);
		frame.add(screen);
		frame.setUndecorated(true);
		frame.setMaximizedBounds(e.getMaximumWindowBounds());
		frame.setExtendedState(frame.getExtendedState() | JFrame.MAXIMIZED_BOTH);
		frame.setVisible(true);
		frame.setAlwaysOnTop(true);
		
		//Until a boolean in the splash screen is made false, the selection frame will not be created
		while (screen.getSplash()) {}
		frame.setVisible(false);
		
		//Creates the selection frame
		SelectionFrame selectionFrame = new SelectionFrame();
		selectionFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		selectionFrame.setMaximizedBounds(e.getMaximumWindowBounds());
		selectionFrame.setExtendedState(selectionFrame.getExtendedState() | JFrame.MAXIMIZED_BOTH);
		selectionFrame.setVisible(true);
	}
}
